package com.wzu.springbootcrud2.utils;

import org.springframework.util.DigestUtils;

public class MD5 {

        //盐，用于混交md5
        private static String salt = "asdwqAsd12_qS";

        /**
         * 生成md5
         * @param str
         * @return
         */
        public static String getMD5(String str) {
            String base = str + "/" + salt;
            String md5 = DigestUtils.md5DigestAsHex(base.getBytes());
            return md5;
        }



}
